home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / MAKEFILE.PC < prev    next >
Text File  |  1993-03-16  |  8KB  |  282 lines

  1. #    SCCS Id: @(#)Makefile.pc    3.0    89/07/07
  2. #    PC NetHack 3.0 Makefile for Microsoft(tm) "C" 4.0 or better.
  3. #
  4. # Large memory model, register bug, remove stack probes:
  5. CC    = msc
  6. LINK    = link
  7. MODEL    = L
  8.  
  9. # Directories (makedefs hardcodes these, don't change them)
  10. INCL    = ..\include
  11. AUX    = ..\auxil
  12. SRC    = ..\src
  13.  
  14. CFLAGS    = -A$(MODEL) -DLINT_ARGS -Ot -Oa -Gs -Gt28 -I$(INCL)
  15. LFLAGS    = -exe -noig -stack:0x0aff -seg:512
  16. TARG    = pc
  17.  
  18. .c.o:
  19.     $(CC) $(CFLAGS) $*.c, o\$*.o;
  20.  
  21. # Optional high-quality BSD random number generation routines (see pcconf.h).
  22. # Set to nothing if not used.
  23. RANDOM = o\random.obj
  24.  
  25. # For NDMAKE, to handle the .o suffix.
  26. .SUFFIXES: .exe .o .c .y .l
  27.  
  28. # The game name
  29. GAME= nethack
  30.  
  31. # The game directory
  32. GAMEDIR = \games\$(GAME)
  33.  
  34. # The game filename
  35. GAMEFILE = $(GAMEDIR)\$(GAME).exe
  36.  
  37. # object files for makedefs
  38. MAKEOBJS = o\makedefs.o o\monst.o o\objects.o
  39.  
  40. # object files for special levels compiler
  41. SPLEVOBJS = o\lev_comp.o o\lev_lex.o o\lev_main.o o\alloc.o o\monst.o o\objects.o o\panic.o
  42.  
  43. # nothing below this line should have to be changed
  44. #
  45. # other things that have to be reconfigured are in config.h,
  46. # {unixconf.h, pcconf.h, tosconf.h}, and possibly system.h
  47.  
  48. VOBJ =    o\allmain.o o\alloc.o o\apply.o o\artifact.o o\attrib.o o\bones.o \
  49.     o\cmd.o o\dbridge.o o\decl.o o\demon.o o\do.o o\do_name.o o\do_wear.o \
  50.     o\dog.o o\dogmove.o o\dokick.o o\dothrow.o o\eat.o o\end.o o\engrave.o \
  51.     o\exper.o o\extralev.o o\fountain.o o\getline.o o\hack.o o\invent.o \
  52.     o\lock.o o\mail.o o\main.o o\makemon.o o\mcastu.o o\mhitm.o o\mhitu.o \
  53.     o\mklev.o o\mkmaze.o o\mkobj.o o\mkroom.o o\mon.o o\mondata.o \
  54.     o\msdos.o o\monmove.o o\monst.o o\mthrowu.o o\music.o o\o_init.o \
  55.     o\objects.o o\objnam.o o\options.o o\pager.o o\pickup.o o\polyself.o \
  56.     o\potion.o o\pray.o o\pri.o o\priest.o o\prisym.o $(RANDOM) o\read.o \
  57.     o\restore.o o\rip.o o\rnd.o o\rumors.o o\save.o o\search.o o\shk.o \
  58.     o\shknam.o o\sit.o o\sounds.o o\sp_lev.o o\spell.o o\steal.o \
  59.     o\termcap.o o\timeout.o o\topl.o o\topten.o o\track.o o\trap.o \
  60.     o\tty.o o\u_init.o o\uhitm.o o\unix.o o\vault.o o\weapon.o o\were.o \
  61.     o\wield.o o\wizard.o o\worm.o o\worn.o o\write.o o\zap.o
  62. HOBJ =    $(VOBJ) o\version.o
  63.  
  64. PCCONF_H   = $(INCL)\$(TARG)conf.h $(INCL)\msdos.h $(INCL)\system.h \
  65.          $(INCL)\extern.h 
  66. GLOBAL_H   = $(INCL)\global.h $(INCL)\coord.h $(PCCONF_H)
  67. CONFIG_H   = $(INCL)\config.h $(INCL)\tradstdc.h $(GLOBAL_H)
  68. TRAP_H       = $(INCL)\trap.h
  69. PERMONST_H = $(INCL)\permonst.h $(INCL)\monattk.h $(INCL)\monflag.h
  70. YOU_H       = $(INCL)\you.h $(INCL)\attrib.h $(PERMONST_H) $(INCL)\mondata.h \
  71.          $(INCL)\monst.h $(INCL)\youprop.h $(INCL)\prop.h $(INCL)\pm.h
  72. DECL_H       = $(INCL)\decl.h $(INCL)\spell.h $(INCL)\obj.h $(YOU_H) \
  73.          $(INCL)\onames.h $(INCL)\color.h
  74. HACK_H       = $(CONFIG_H) $(DECL_H) $(INCL)\monsym.h $(INCL)\mkroom.h \
  75.          $(INCL)\objclass.h $(INCL)\gold.h $(INCL)\trap.h $(INCL)\flag.h \
  76.          $(INCL)\rm.h $(INCL)\hack.h
  77.  
  78. # The main target
  79. $(GAMEDIR)\$(GAME).exe: o $(HOBJ)
  80.     .\linkit
  81. #    $(LINK) $(HOBJ),nethack,nethack,ltermcap llibux $(LFLAGS) ;
  82.  
  83. # NDMAKE automatically generates LINK response files, so you can
  84. # uncomment the second line if you are using NDMAKE.
  85.  
  86. $(GAME): $(GAMEDIR)\$(GAME).exe
  87. $(GAME).exe: $(GAMEDIR)\$(GAME).exe
  88.  
  89. .c.o:
  90.     $(CC) $(CFLAGS) $*.c, o\$*.o ;
  91.  
  92. all:    o $(GAME) auxil
  93.     @echo Done.
  94.  
  95. o:
  96.     mkdir o
  97.  
  98. makedefs.exe:    $(MAKEOBJS)
  99.     $(LINK) $(LFLAGS) $(MAKEOBJS);
  100.  
  101. o\makedefs.o:  $(INCL)\config.h $(INCL)\permonst.h $(INCL)\objclass.h
  102.  
  103. lev_comp.exe:  $(SPLEVOBJS)
  104.     $(LINK) $(LFLAGS) -o lev_comp $(SPLEVOBJS)
  105.  
  106. o\lev_comp.o:  $(HACK_H) $(INCL)\sp_lev.h
  107. o\lev_lex.o:  $(INCL)\lev_comp.h $(HACK_H) $(INCL)\sp_lev.h
  108. o\lev_main.o:  $(HACK_H)
  109.  
  110. # If you have yacc or lex programs, and make any changes,
  111. # add some .y.c and .l.c rules to your Make.ini.
  112.  
  113. lev_comp.c:  lev_comp.y
  114. lev_lex.c:  lev_comp.l
  115.  
  116. #
  117. #    The following include files depend on makedefs to be created.
  118. #
  119. #    date.h should be remade any time any of the source or include code
  120. #    is modified.
  121. #
  122. $(INCL)\date.h:     $(VOBJ) makedefs.exe
  123.     .\makedefs -v
  124.  
  125. $(INCL)\trap.h:     makedefs.exe
  126.     .\makedefs -t
  127.  
  128. $(INCL)\onames.h:  makedefs.exe
  129.     .\makedefs -o
  130.  
  131. $(INCL)\pm.h:  makedefs.exe
  132.     .\makedefs -p
  133.  
  134. data:    $(AUX)\data.base makedefs.exe
  135.     .\makedefs -d
  136.  
  137. rumors: $(AUX)\rumors.tru $(AUX)\rumors.fal makedefs.exe
  138.     .\makedefs -r
  139.  
  140. #
  141. #    The following programs vary depending on what OS you are using.
  142. #
  143. o\main.o:   $(HACK_H) $(TARG)main.c
  144.     $(CC) $(CFLAGS) $(TARG)main.c, o\main.o ;
  145.  
  146. o\tty.o:   $(HACK_H) $(INCL)\func_tab.h $(TARG)tty.c
  147.     $(CC) $(CFLAGS) $(TARG)tty.c, o\tty.o ;
  148.  
  149. o\unix.o:   $(HACK_H) $(TARG)unix.c
  150.     $(CC) $(CFLAGS) $(TARG)unix.c, o\unix.o ;
  151.  
  152. #
  153. # Secondary targets
  154. #
  155.  
  156. auxil:    spec_levs
  157.     cd $(AUX)
  158.     xcopy *. $(GAMEDIR)
  159.  
  160. spec_levs: $(AUX)\castle.des $(AUX)\endgame.des $(AUX)\tower.des
  161.     lev_comp $(AUX)\castle.des
  162.     lev_comp $(AUX)\endgame.des
  163.     lev_comp $(AUX)\tower.des
  164.     cd $(AUX)
  165.     xcopy castle $(GAMEDIR)
  166.     del castle
  167.     xcopy endgame $(GAMEDIR)
  168.     del endgame
  169.     xcopy tower? $(GAMEDIR)
  170.     del tower?
  171.  
  172. clean:
  173.     del o\*.obj
  174.     rmdir o
  175.  
  176. spotless: clean
  177.     cd $(INCL)
  178.     del date.h
  179.     del onames.h
  180.     del pm.h
  181.     touch date.h onames.h pm.h
  182.     cd $(SRC)
  183.     del makedefs.exe
  184.     if exist lev_comp.exe del lev_comp.exe
  185.  
  186. #
  187. # Other dependencies
  188. #
  189.  
  190. # GO AHEAD, DELETE THIS LINE
  191.  
  192. o\allmain.o:  $(HACK_H)
  193. o\alloc.o:  $(CONFIG_H)
  194. o\apply.o:  $(HACK_H) $(INCL)\edog.h
  195. o\artifact.o:  $(HACK_H) $(INCL)\artifact.h
  196. o\attrib.o:  $(HACK_H)
  197. o\bones.o:  $(HACK_H)
  198. o\cmd.o:  $(HACK_H) $(INCL)\func_tab.h
  199. o\dbridge.o: $(HACK_H)
  200. o\decl.o:  $(HACK_H)
  201. o\demon.o:  $(HACK_H)
  202. o\do.o:  $(HACK_H)
  203. o\do_name.o:  $(HACK_H)
  204. o\do_wear.o:  $(HACK_H)
  205. o\dog.o:  $(HACK_H) $(INCL)\edog.h
  206. o\dogmove.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h
  207. o\dokick.o:  $(HACK_H) $(INCL)\eshk.h
  208. o\dothrow.o:  $(HACK_H)
  209. o\eat.o:  $(HACK_H)
  210. o\end.o:  $(HACK_H) $(INCL)\eshk.h
  211. o\engrave.o:  $(HACK_H)
  212. o\exper.o:  $(HACK_H)
  213. o\extralev.o:  $(HACK_H)
  214. o\fountain.o:  $(HACK_H)
  215. o\getline.o:  $(HACK_H) $(INCL)\func_tab.h
  216. o\hack.o:  $(HACK_H)
  217. o\invent.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  218. o\ioctl.o:  $(HACK_H)
  219. o\lock.o:  $(HACK_H)
  220. o\makemon.o:  $(HACK_H)
  221. o\mail.o:  $(HACK_H)
  222. o\mcastu.o:  $(HACK_H)
  223. o\mhitm.o:  $(HACK_H) $(INCL)\artifact.h
  224. o\mhitu.o:  $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h
  225. o\mklev.o:  $(HACK_H)
  226. o\mkmaze.o:  $(HACK_H)
  227. o\mkobj.o:  $(HACK_H)
  228. o\mkroom.o:  $(HACK_H)
  229. o\mon.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\wseg.h
  230. o\mondata.o:  $(HACK_H) $(INCL)\eshk.h $(INCL)\epri.h
  231. o\monmove.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h
  232. o\monst.o:  $(CONFIG_H) $(PERMONST_H) $(INCL)\monsym.h $(INCL)\eshk.h $(INCL)\vault.h $(INCL)\epri.h $(INCL)\color.h
  233. o\msdos.o:  $(HACK_H)
  234. o\mthrowu.o:  $(HACK_H)
  235. o\music.o:  $(HACK_H)
  236. o\o_init.o:  $(HACK_H)
  237. o\objects.o:  $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h $(INCL)\prop.h $(INCL)\color.h
  238. o\objnam.o:  $(HACK_H)
  239. o\options.o:  $(HACK_H)
  240. o\pager.o:  $(HACK_H)
  241. o\panic.o:  $(CONFIG_H)
  242. o\pickup.o:  $(HACK_H)
  243. o\polyself.o:  $(HACK_H)
  244. o\potion.o:  $(HACK_H)
  245. o\pray.o:  $(HACK_H)
  246. o\pri.o:  $(HACK_H) $(INCL)\epri.h $(INCL)\termcap.h
  247. o\priest.o:  $(HACK_H) $(INCL)\mfndpos.h $(INCL)\eshk.h $(INCL)\epri.h
  248. o\prisym.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  249. o\random.o:
  250. o\read.o:  $(HACK_H)
  251. o\restore.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  252. o\rip.o:  $(HACK_H)
  253. o\rnd.o:  $(HACK_H)
  254. o\rumors.o:  $(HACK_H)
  255. o\save.o:  $(HACK_H) $(INCL)\lev.h $(INCL)\wseg.h
  256. o\search.o:  $(HACK_H) $(INCL)\artifact.h
  257. o\shk.o:  $(HACK_H) $(INCL)\eshk.h
  258. o\shknam.o:  $(HACK_H) $(INCL)\eshk.h
  259. o\sit.o:  $(HACK_H)
  260. o\sounds.o:  $(HACK_H) $(INCL)\edog.h $(INCL)\eshk.h
  261. o\sp_lev.o:  $(HACK_H) $(INCL)\sp_lev.h
  262. o\spell.o:  $(HACK_H)
  263. o\steal.o:  $(HACK_H)
  264. o\termcap.o:  $(HACK_H) $(INCL)\termcap.h
  265. o\timeout.o:  $(HACK_H)
  266. o\topl.o:  $(HACK_H)
  267. o\topten.o:  $(HACK_H)
  268. o\track.o:  $(HACK_H)
  269. o\trap.o:  $(HACK_H) $(INCL)\edog.h
  270. o\u_init.o:  $(HACK_H)
  271. o\uhitm.o:  $(HACK_H) $(INCL)\artifact.h
  272. o\vault.o:  $(HACK_H) $(INCL)\vault.h
  273. o\version.o:  $(HACK_H) $(INCL)\date.h $(INCL)\patchlev.h
  274. o\weapon.o:  $(HACK_H)
  275. o\were.o:  $(HACK_H)
  276. o\wield.o:  $(HACK_H)
  277. o\wizard.o:  $(HACK_H)
  278. o\worm.o:  $(HACK_H) $(INCL)\wseg.h
  279. o\worn.o:  $(HACK_H)
  280. o\write.o:  $(HACK_H)
  281. o\zap.o:  $(HACK_H)
  282.